package com.example.demo.control;

import com.alibaba.fastjson.JSON;
import com.example.demo.mapper.RoleMapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@ResponseBody
@Controller
public class NameControl {
    @PostMapping("/c/menuusername")
    public String cusername(HttpSession httpSession){
        return JSON.toJSONString(httpSession.getAttribute("backname"));
    }
}
